package com.example.inprinciple.singleResponsibility.test;


/**
 * 创建日期：2022/6/3 0003 16:03
 *
 * @author tony.sun
 * 类说明：
 */
public class SingleResponsibility1B {
    public static void main(String[] args) {
        VehicleB vehicle = new VehicleB();
        vehicle.userBy("汽车");
        vehicle.userBy("飞机");
        vehicle.userBy("船");
    }
}
class  VehicleB{
    public void userBy(String name) {
        System.out.println(name+"在公路上跑");
    }
}
